package com.practice;

import java.util.Random;

public class Prize {
    public static void main(String[] args) {
        Random r=new Random();
        int[] arrPrize={2,588,888,1000,10000};
        int[] copy_arrPrize=new int[arrPrize.length];
        for (int i = 0; i < arrPrize.length; ) {
            int randomPrize=arrPrize[r.nextInt(arrPrize.length)];
            if(Judge(copy_arrPrize,randomPrize)){
                copy_arrPrize[i]=randomPrize;
                i++;
            }
        }
        for (int i = 0; i < copy_arrPrize.length; i++) {
            System.out.print(copy_arrPrize[i]+" ");
        }

    }

    public static boolean Judge(int[] arr,int prize){
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]==prize) {
                return false;
            }
        }
        return true;
    }
}
